// 风险条款
<template>
  <div class="market-cost-box">
    <div class="total-num-box">
      <!-- <span class="font-weight-700 font-size-18">营销成本</span> -->
      预计影响收入：
      <span class="font-weight-700">{{ allMoney | moneyFilterNoUnit }}</span>
      元
    </div>
    
    <el-collapse v-model="activeName" accordion>
      <el-collapse-item title="风险条款" name="1">
        <el-table :border="false" :data="tableList" class="new-table-style">
          <el-table-column align="left" label="条款" prop="clause"> </el-table-column>
          <el-table-column align="center" label="预计影响金额" prop="extremesAffectIncome"> </el-table-column>
          <el-table-column align="center" label="规避方案" prop="riskAversion"> </el-table-column>
        </el-table>
        </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
  export default {
    props: {
      tableList: {
        type: Array,
        default: () => {
          return [];
        },
      },
    },

    data() {
      return {
        activeName: 1,
        contractType: this.$route.query.contractType,
      };
    },
    computed: {
      allMoney() {
        this.tableList = this.tableList || []
        let sum = this.tableList.reduce((prev, item) => {
          prev += item.extremesAffectIncome
          return prev;
        }, 0);
        return sum;
      },
    },
    mounted() {},

    methods: {},
  };
</script>

<style lang="scss" scoped>
.market-cost-box {
  position: relative;
}

::v-deep .el-collapse-item__header {
  font-size: 18px;
  font-weight: 700;
}

.total-num-box {
  position: absolute;
  right: 40px;
  top: 13px;
}
</style>
